package tests.old;
/**
 * contem erro -> está comentado
 * */
/*
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import exceptions.InvalidUserAddress;
import exceptions.InvalidUserException;
import exceptions.InvalidUserName;
import exceptions.InvalidUserUsername;
import exceptions.YouAreAlreadyFriends;
import exceptions.YouHaveAlreadyRequestedFriendship;
import exceptions.YouHaventReceivedARequest;

import root.friendship.FriendshipManager;
import root.user.User;


public class FriendshipManagerTest {
	
	FriendshipManager instance;
	User a, b;
	@Before
	public void setUp() throws InvalidUserUsername, InvalidUserName, InvalidUserAddress {
		FriendshipManager.setInstance(null);
		instance = FriendshipManager.getInstance();
		a = new User("oi", "oi", "oi");
		b = new User("ola", "ola" ,"ola");
	}
	
	@Test
	public void testGet() {
		if (instance == null)
			Assert.assertEquals(1, 2);
	}

	@Test
	public void testFalseRequestFriendShip() {
		Assert.assertEquals(false, instance.hasPendingRequest(a, b));
	}
	
	@Test
	public void testFalseFriendShip() {
		Assert.assertEquals(false, instance.isFriend(a, b));
	}

	@Test(expected=YouHaventReceivedARequest.class)
	public void invalidDenyOfFriendship() throws YouHaventReceivedARequest, YouAreAlreadyFriends, InvalidUserException {
		instance.denyFriendship(a, b);
	}
	
	
	@Test(expected=YouHaventReceivedARequest.class)
	public void invalidAcceptanceOfFriendship() throws YouHaventReceivedARequest, YouAreAlreadyFriends, InvalidUserException {
		instance.acceptFriendship(a, b);
	}
	
	@Test
	public void testTrueRequestFriendShip() throws YouHaveAlreadyRequestedFriendship, YouAreAlreadyFriends, InvalidUserException {
		instance.requestFriendShip(a, b);
		Assert.assertEquals(true, instance.hasPendingRequest(a, b));
	}
	
	@Test(expected=YouHaveAlreadyRequestedFriendship.class)
	public void testExceptionRequestFriendship() throws YouHaveAlreadyRequestedFriendship, YouAreAlreadyFriends, InvalidUserException {
		instance.requestFriendShip(a, b);
		instance.requestFriendShip(a, b);
	}
	
	@Test
	public void denyFriendship() throws YouHaventReceivedARequest, YouAreAlreadyFriends, InvalidUserException, YouHaveAlreadyRequestedFriendship {
		instance.requestFriendShip(a, b);
		instance.denyFriendship(b, a);
		instance.validateRelationships();
		Assert.assertEquals(false, instance.hasPendingRequest(a, b));
	}
	
	@Test
	public void requestFriendShipAfterDeny() throws YouHaveAlreadyRequestedFriendship, YouAreAlreadyFriends, InvalidUserException, YouHaventReceivedARequest {
		instance.requestFriendShip(a, b);
		instance.denyFriendship(b, a);
		instance.validateRelationships();
		instance.requestFriendShip(a, b);
		Assert.assertEquals(true, instance.hasPendingRequest(a, b));
	}
	
	
	@Test
	public void testTrueFriendship() throws YouHaveAlreadyRequestedFriendship, YouAreAlreadyFriends, InvalidUserException {
		instance.requestFriendShip(a, b);
		instance.requestFriendShip(b, a);
		instance.validateRelationships();
		Assert.assertEquals(true, instance.isFriend(a, b));
		Assert.assertEquals(true, instance.isFriend(b, a));
		
	}
	
	@Test(expected=YouAreAlreadyFriends.class)
	public void testExceptionAlreadyFriends() throws YouHaveAlreadyRequestedFriendship, YouAreAlreadyFriends, InvalidUserException {
		instance.requestFriendShip(a, b);
		instance.requestFriendShip(b, a);
		instance.validateRelationships();
		instance.requestFriendShip(a, b);
	}
	
}
*/